package tests;

import tester.*;

@Example
public class FirstTest {

	public FirstTest(){}
	
	
	@TestMethod
	public void testMessage(Tester t){
		MessageContainer mc = new MessageContainer("Hello World");
		
		/*Verify return value matches the expected value*/
		t.checkExpect(mc.getMessage(), "Hello World");
		
		/*Verify that the object was constructed as expected*/
		t.checkExpect(mc.message, "Hello World");
	}
	
}

/**
 * Simple message container.
 * @author Weston Jossey
 * @since Feb 1. 2009
 *
 */
class MessageContainer {

	final String message;

	/**
	 * Constructs a MessageContainer object with
	 * the given message. 
	 * @param message message to store
	 */
	public MessageContainer(String message) {
		this.message = message;
	}

	/**
	 * Retrieves the given message.
	 * @return stored message
	 */
	public String getMessage() {
		return message;
	}

}
